<?php
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', true);

include_once "config.php";
include_once "connect.php";
include_once "sujet.php";

$posteur="select pseudo from AP3_SP_post where id_post=".$_GET['id_post']."";
mysql_query($posteur);
$row=mysql_fetch_assoc($req1);
	if($row["pseudo"]==$_SESSION["user"])
	{
		$delete= "delete from AP3_SP_post where id_post=".$_GET['id_post']."";
		mysql_query ($delete);
		$delete= "delete from AP3_SP_post where id_pere=".$_GET['id_post']."";
		mysql_query ($delete);
	}
	
header("Location: categorie.php?id=".$_GET["id_categorie"]);
?>